1. Field of the Invention
The present invention relates to a program edit apparatus. More particularly, the present invention relates to a program edit apparatus, a program edit method and a computer readable medium used to edit a source program to which a compile condition is designated.
2. Description of the Related Art
In recent years, there are many cases in which new programs written in programming languages such as C language, assembler and COBOL are being developed by modifying a part of program. For example, an original program is revised and is improved according to a hardware configuration, and then new a program is developed. In this way, when the new program is developed by modifying a part of a program, the program is often edited with an editing program (editor). Such editor lightens the burden on a programmer and an operator, and therefore, it is possible to improve productivity in program development.
Further, to make the program useable for various models (hardware), namely, to develop a general-purpose program, there is a case that the program includes compile conditions according to a model of a computer to be used. The compile condition, to distinguish source program statement to be complied only when object program for one model is edited, is designated by writing a preprocessor control statement indicating contents thereof in the source program and the like. Preprocessor is a process in that the source program is rewritten according to designated statement before compiling the source program, namely, a pre-process. The preprocessor control statement is described in the source program in order to show contents of the preprocessor. When a compile condition is designated according to a model to be used, only statements in which the designated compile condition is set and statements used regardless of compilation conditions are extracted from the source program, and then only the extracted statements are compiled by the compiler.
In this way, as various compile conditions are set in the original source program, this source program becomes complicated, therefore, the edit operation for this source program becomes complicated. On this account, it is requested to provide a program edit apparatus capable of easily editing the source program which becomes complicated by setting various compile conditions.
Conventionally, there is a source program edit method in which the source program is displayed as it is and then is edited, and a source program edit method in which the complicated source program is divided and then edited, and the like.
However, according to the source program edit method in which the source program is displayed as it is, when the source program becomes complicated by setting various compile conditions are described, it becomes difficult for a programmer to understand the source program containing the complicated compile conditions. Therefore, there is a high possibility in that programming mistakes are produced.
Further, according to the source program edit method in which the complicated source program is divided, it becomes difficult to administrate the divided source program. On this account, there is a high possibility in that programming mistakes are produced and there is a problem in that the editing operation of the source program becomes complicated.